import {createRouter, createWebHashHistory} from 'vue-router'
import Home from '../App.vue'

const routes = [
    {
        path: '/Home',
        name: 'Home',
        component: () => import('../App.vue'),
        meta: {
            title: '首页',

        }
    },


    {
        path: '/Game',
        name: 'Game',
        component: () => import('../view/Game/GameName.vue'),
        meta: {
            title: '游戏账户',
        },
    },

    {
        path: '/',
        redirect: '/login',
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('../view/loging/login.vue'),
    },
    {
        path: '/GameECPM',
        name: 'GameECPM',
        component: () => import ('../view/Game/GameEcpm.vue'),
        meta: {
            title: '游戏ECPM'
        },
    }, {
        path: '/GameUser',
        name: 'Gameuser',
        component: () => import ('../view/Game/GameUser.vue'),
        meta: {
            title: '游戏用户'
        },
    }

]
const router = createRouter({
    history: createWebHashHistory(),
    routes,
    //滚动行为
    scrollBehavior() {
        return {
            left: 0,
            top: 0,
        }
    },
})
export default router
